<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
{if isset($aSurvey) && !empty($aSurvey)}
<div class="cell-wrapper">
    <div class="cell">

        <div class="item">
            {if !isset($bHideUserInfo)}
            <div class="user-info">
                <div class="user-image">
                    {img user=$aSurvey suffix='_50_square' max_width=50 max_height=50}
                </div>
                <div class="user-name">
                    {$aSurvey|user:'':'':50}
                    <p class="time-stamp">{$aSurvey.time_stamp|convert_time:'feed.feed_display_time_stamp'}</p>
                </div>
            </div>
            <div class="clear"></div>
            {/if}
            <div class="survey-info">
                <div class="title">
                    {$aSurvey.title}                    
                    
                    <span {if !isset($bShowFollowing) || !$bShowFollowing}style='display:none;'{/if} class="follow survey_item_following{$aSurvey.survey_id}"><a href="#" onclick="$.ajaxCall('survey.follow','id={$aSurvey.survey_id}');$(this).parent().hide();$('.survey_item_follow{$aSurvey.survey_id}').show();return false;" class="button" title="Click to follow">Follow</a></span>
                    
                    <span {if !isset($bShowFollow) || !$bShowFollow}style='display:none;'{/if} class="follow following survey_item_follow{$aSurvey.survey_id}"><a href="#" onclick="$.ajaxCall('survey.follow','id={$aSurvey.survey_id}');$(this).parent().hide();$('.survey_item_following{$aSurvey.survey_id}').show();return false;" class="button" title="Click to unfollow">Following</a></span>
                    
                    
                </div>
                <div class="question">{$aSurvey.question}</div>
                <div class="type-attachment">
                    {if !empty($aSurvey.ref_link) && $aSurvey.ref_type == "image"}
                        {img server_id=$aSurvey.image_server_id path='survey.url_image' width=450 file=$aSurvey.ref_link suffix='' title=$aSurvey.title}
                    {/if}
                </div>
            </div>
            <div class="clear"></div>	
            {if isset($bIsMini) && $bIsMini == 1}
            <div class="uty">
                    <ul>
                            {module name='like.link' like_type_id="survey" like_item_id=$aSurvey.survey_id like_is_liked=$aSurvey.is_liked}
                            <li>
                                    <a href="{$aSurvey.title}add-comment/" onclick="return false;" class="feed_action_link feed_link_comment {if isset($aSurvey.total_comment)}{else}js_feed_entry_add_comment no_ajax_link{/if}"><!--{phrase var='feed.comment'}--></a>
                            </li>
                            {module name='share.link' type='feed' display='menu' url="" title=$aSurvey.title}
                    </ul>
            </div>
            <div class="clear"></div>
            {/if}
        </div>
        {if !isset($bIsMini) || $bIsMini == false}
        <div class="comment">
            {module name='feed.comment' aFeed=$aSurvey.aFeed}
        </div>
        {/if}
    </div>
</div>
{/if}